package com.swak.resilience4j;

import java.util.concurrent.atomic.AtomicInteger;

@SuppressWarnings("unused")
public class BackendService {

	AtomicInteger count = new AtomicInteger();

	public String doSomething(Object p1, Object p2) {
		count.incrementAndGet();
		System.out.println("【Invoke】 Invoke Count:" + count.get() + "; Use Thread:" + Thread.currentThread().getName());
		try {
			int i = 1 / 0;
			return "Hello Backend Service.";
		} finally {
			System.out.println("【Invoke】 Invoke End");
		}
	}
}
